import os

# from language import language
s = [
    "vosk",
    "db-sqlite3",
    "PyPI-Browser",
    "datetime",
    "googletrans",
    "pyserial",
    "requests",
    "bs4",
    "numpy",
    "glob2",
    "fuzzywuzzy",
    "Wikipedia-API",
    "python-vlc",
    "googletrans",
    "transliterate",
    "omegaconf",
    "tensorflow",
    "onnx",
    "torch",
    "tensorflow_hub",
    "torchaudio",
    "sounddevice",
    "psutil",
]


"""
os.system("sudo apt install python3-pip")
os.system("sudo apt-get install python3-pyaudio")
os.system("sudo apt-get update")
os.system("yes|sudo apt-get install vlc")
os.system("sudo add-apt-repository ppa:linvinus/rhvoice")
os.system("sudo apt-get update")
os.system("sudo apt-get install rhvoice")
os.system("sudo apt-get install rhvoice-english")

os.system("sudo apt-get update")
#print(language["install"]["install_voice_module"])
#os.system(language["install"]["voice_language_synthesizer"]["ru"])
#print(language["install"]["end_install_voice_module"])
#os.system(f'echo {language["install"]["end_install_voice_module"]} |RHVoice-client -s Anna  --rate 0.2 --pitch 0.05 | aplay')

"""
# os.system("yes|sudo apt-get install python-pyaudio python3-pyaudio")
# print(language["install"]["install_s_r_"])
# os.system(f'echo {language["install"]["install_s_r_"]} |RHVoice-client -s Anna  --rate 0.2 --pitch 0.05 | aplay')

# os.system(f'echo {language["install"]["install_base_module"]}  |RHVoice-client -s Anna  --rate 0.2 --pitch 0.05 | aplay')
# print(language["install"]["install_base_module"])
# print(language["install"]["update_pip"])
#
# os.system(f'echo {language["install"]["update_pip"]} |RHVoice-client -s Anna  --rate 0.2 --pitch 0.05 | aplay')
os.system("pip3 install --upgrade pip")


for x in range(0, len(s), 1):
    os.system(f"sudo pip3 install {s[x]}")
    # print(f"{language['install']['pip_install_moduls']} {s[x]}")


print()
# os.system(f'echo {language["install"]["end_install_moduls_core"]} |RHVoice-client -s Anna  --rate 0.2 --pitch 0.05 | aplay')
